package 组合设计模式;

public class Main {
    public static void main(String[] args) {
        Root root = new Folder("根文件夹");
        root.addFile(new File("1"));
        root.addFile(new File("2"));
        root.addFile(new File("3"));
        Folder test文件夹 = new Folder("test文件夹");
        test文件夹.addFile(new File("ssfddafda"));
        root.addFile(test文件夹);
        System.out.println(root.listFile());
    }
}
